package cn.wolfcode.luowowo.comment.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Setter@Getter
@Document("strategy_comment")
public class StrategyComment implements Serializable {//攻略评论
    @Id
    private String id;//本来存进MongoDB的主键应该是ObjectId类型的,但是写String,底层会自动转换

    private Long detailId;//指向哪一篇攻略

    private String detailTitle;//攻略的标题

    private Long userId;//评论者的id

    private String username;

    private Integer level;

    private String headUrl;

    private Date createTime;//评论的时间

    private String content;//评论内容

    private Integer thumbupnum = 0;//点赞数

    private List<Long> thumbuplist = new ArrayList<>();//点赞列表,里面存的是点赞这的id
}
